package billings.classtasks;

import android.content.Context;
import android.database.SQLException;
import android.database.sqlite.SQLiteDatabase;

public class BaseDAO {

	protected SQLiteDatabase database;
	protected DatabaseHelper dbHelper;
	
	public BaseDAO(Context context){
		dbHelper = new DatabaseHelper(context);
	}
	
	public void open() throws SQLException {
		database = dbHelper.getWritableDatabase();
	}
	
	public void close() throws SQLException {
		database.close();
	}
	
	public void clearAll(){
		dbHelper.clearAll(database);
	}
}
